<?php

class WkList extends CI_Model{
    
    function __construct(){
        // Call the Model constructor
        $db = $this->load->database();
        parent::__construct();
    }
    
    function getSome($year_, $kelas){
        
        $SQL    = "
            select w.ID as `ID`, w.WKID as `code`, w.WK as `name` 
            from wk_list w where w.RPS = ".$year_." and w.kelas = '".$kelas."'  group by ID order by w.WK
        ";
        $q      = $this->db->query($SQL);
        $data   = $q->result_array();
        
        return $data;
    }
    
}